<!DOCTYPE html>
<html>
<meta charset="utf-8">
<body>
	<form id="add_filed_qryForm">
		<table class="contentTb" >
			<tr>
				<td align="right">字段：</td>
				<td>
						<input type="hidden" name="pintUuid" id="pintUuid"/>
						<input type="hidden" name="fildmSeqnoUuid" value="0"/>
						<input type="hidden" name="fildCode" id="fildCode">
					<select id="chind_fildmUuid" 	name="fildmUuid" data-options="required:true" style="width: 195px"></select>
				</td>
			</tr>
			<tr>
				<td align="right">附件：</td>
				<td>
					<input type="hidden" name="atctSeqnoUuid" value="0">
					<select id="chind_atctUuid" 	name="atctUuid" data-options="required:true" style="width: 195px"></select>
				</td>
			</tr>
			<tr>
				<td align="right">必须存在：</td>
				<td>
					<input class="easyui-combobox"   name="attisExists"  data-options="valueField: 'label',textField:'value',
						data: [{label: '0',	value: '否'	},{label: '1',	value: '是 '}]
					,required:true" style="width: 195px"/>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<div style="margin-top: 10px;" align="center">
						<a class="easyui-linkbutton" data-options="iconCls:'icon-remove'"
							href="javascript:void(0)" id="add_filed_delBtn" style="width: 80px">删除</a>
						<a class="easyui-linkbutton" data-options="iconCls:'icon-undo'"
							href="javascript:void(0)" id="add_filed_returnBtn" onclick="retBack_filed()" style="width: 80px">返回</a>
					</div>
				</td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		function initSelect(item){
			$(item['id']).combobox({
			    url:BUS_URL+"epintinfo/queryK?tableName="+item['tableName'],
			    valueField:item['v_id'],
			    textField:item['t_id'],
			    method:'get',
			    onSelect:function(node){
			    	if(item['id']=="#chind_fildmUuid"){
			    		$("#fildCode").val(node.fildcode);
			    	}
			    }
			});
		}
		$(function() {
			initSelect({id:"#chind_fildmUuid",tableName:"rlefildm",v_id:"fildmuuid",t_id:"fildname"});
			initSelect({id:"#chind_atctUuid",tableName:"rleatctm",v_id:"atctUuId",t_id:"atctName"});
			commonViewLoadForm('add_filed_qryForm',op_row_filed)
			$("#chind_fildmUuid").combobox("setValue",op_row_filed.fildmUuid);
			$("#chind_atctUuid").combobox("setValue",op_row_filed.atctUuid);
			$("#add_filed_delBtn").click(function() {
				var req = {
					useToken : true
				};
				req['reqJSON'] = {
					url : BUS_URL + 'epintinfo/deleteEatfa?atfaUuid='+op_row_filed.atfaUuid,
					type : 'delete'
				};
				req['successFn'] = function(respData) {
					if (respData.code == SUCCESS_CODE) {
						$("#add_filed_win").window('close');
						$("#add_filed_wxConfigManage").datagrid("load");
					} else {
						$.messager.alert('提示', respData.message);
					}
				};
				ajaxRequest(req);
			})
		})
	</script>
</body>
</html>